﻿using A_Shop.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Data.Entity;

namespace A_Shop.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/
        private ContextDatos db = new ContextDatos();

        public ActionResult Index()
        {
            var Productos=db.Productos.ToList();
            return View(model: Productos);
        }


        public ActionResult Marcas()
        {
            return View(db.Marcas.ToList());
        }


        public ActionResult ProductosMarca(long id)
        {
            Marca Marca = db.Marcas.Find(id);
            return View(model: Marca);
        }

    }
}
